﻿using BCVP.Net8.IService;
using BCVP.Net8.Model;
using BCVP.Net8.Model.ViewModel;
using BCVP.Net8.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCVP.Net8.Service
{
    public class UserService : IUserService
    {
        public async Task<List<UserVM>> Query()
        {
            var userRepo=new UserRepository();
            var users=await userRepo.Query();
            return users.Select(t=>new UserVM() { UserName=t.Name}).ToList();
        }
    }
}
